// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */
// 首页
import Goods from '@/views/goods/Goods';
// 看板
import panel from '@/views/goods/panel';
// 机器信息管理
import Machine from '@/views/afterSales/Machine';
// 货道信息管理
import MachineAisle from '@/views/afterSales/MachineAisle';
/**
 * 设备管理
 */
// 设备管理
import Equipment from '@/views/device/Equipment';
// 设备详情
import detail from '@/views/device/detail';
    //设备信息
    import information from '@/components/DeviceDetails/information';
    //启动卡信息
    import startupCard from '@/components/DeviceDetails/startupCard';
    //虚拟卡信息
    import virtualCard from '@/components/DeviceDetails/virtualCard';
    //调度日志
    import ScheduleLogs from '@/components/DeviceDetails/ScheduleLogs';
    //套餐充值
    import comboRecharge from '@/components/DeviceDetails/comboRecharge';
        //已购买套餐
        import bought from '@/components/DeviceDetails/bought';
        //可购买套餐
        import choose from '@/components/DeviceDetails/choose';
    //设备位置
    import location from '@/components/DeviceDetails/location';
    //实名认证
    import attestation from '@/components/DeviceDetails/attestation';
    //设备限速
    import speedLimit from '@/components/DeviceDetails/speedLimit';
    //操作记录
    import operate from '@/components/DeviceDetails/operate';
    //设备日平均用量（网速）
    import consumption from '@/components/DeviceDetails/consumption';
//设备套餐
import Combo from '@/views/device/Combo';
//设备类型管理
import DeviceType from '@/views/device/DeviceType';
//设备入库
import Warehousing from '@/views/device/Warehousing';
//设备分发
import Distribute from '@/views/device/Distribute';
//设备充值
import Recharge from '@/views/device/Recharge';
//设备流量
import Flow from '@/views/device/Flow';
//流量详单
import Bill from '@/views/device/Bill';
/**
 * 支付管理
 */
// 订单管理
import orders from '@/views/pay/orders';
// 退费单管理
import refund from '@/views/pay/refund';
// 微信退费管理
import WXrefund from '@/views/pay/WXrefund';
// 优惠券管理
import Coupons from '@/views/pay/Coupons';
// 系统环境变量
import CouponRecords from '@/views/pay/CouponRecords';
// 充值卡管理
import RechargeCard from '@/views/pay/RechargeCard';
//余额充值订单
import BalanceRecharge from '@/views/pay/BalanceRecharge';
//余额充值退费
import BalanceRefund from '@/views/pay/BalanceRefund';
/**
 * 售后管理
 */
// 设备售后
import deviceAfterSales from '@/views/afterSales/deviceAfterSales';
// 资费转移
import TariffTransfer from '@/views/afterSales/TariffTransfer';
// 售后投诉
import complaints from '@/views/afterSales/complaints';
// 支付配置
import Config from '@/views/device/Config';
/**
 * 成本管理
 */
// 限速策略
import tactics from '@/views/CostManag/tactics';
//限速记录
import Recording from '@/views/CostManag/Recording';
/**
 * 商户管理
 */
//商户管理
import Businesses from '@/views/Businesses/Businesses';
/**
 * 调度管理
 */
//卡组管理
import CardSet from '@/views/dispatch/CardSet';
//设备组管理
import DeviceGroups from '@/views/dispatch/DeviceGroups';
//策略配置
import strategy from '@/views/dispatch/strategy';
//调度日志
import log from '@/views/dispatch/log';
//调度状态
import state from '@/views/dispatch/state';
/**
 * SIM卡管理
 */
// SIM卡管理
import manage from '@/views/SimCard/manage';
// SIM卡入库
import stockroom from '@/views/SimCard/stockroom';
// SIM卡状态管理
import StateManag from '@/views/SimCard/StateManag';
// SIM卡查询
import enquiries from '@/views/SimCard/enquiries';
/**
 * 套餐管理
 */
// 运营商套餐管理
import Operators from '@/views/comboManage/Operators';
// 用户套餐管理
import user from '@/views/comboManage/user';
// 套餐分组
import grouping from '@/views/comboManage/grouping';
/**
 * 系统管理
 */
// 账号管理
import Account from '@/views/system/Account';
/**
 * 公众号管理
 */
// 公众号管理
import Manage from '@/views/OfficialAccount/manage';
// 用户标签
import UserLabel from '@/views/OfficialAccount/UserLabel';
// 微信活动
import activity from '@/views/OfficialAccount/activity';
// app图片
import AppImage from '@/views/OfficialAccount/AppImage';
// app消息
import AppMessage from '@/views/OfficialAccount/AppMessage';


/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';

// 图表界面
import statistics from '@/views/CostManag/statistics';

// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
            path: '/goods/Goods',
            name: '首页',
            component: Goods,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/goods/panel',
            name: '看板',
            component: panel,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/afterSales/Machine',
            name: '机器信息管理',
            component: Machine,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/afterSales/MachineAisle',
            name: '货道信息管理',
            component: MachineAisle,
            meta: {
                requireAuth: true
            }
        },
        //设备管理
        {
            path: '/device/Equipment',
            name: '设备管理',
            component: Equipment,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/device/detail',
            name: '设备详情',
            component: detail,
            children:[
                {
                    path:'/components/DeviceDetails/information',
                    name:'设备信息',
                    component:information,
                    meta: {
                        requireAuth: true
                    }
                },
                {
                    path:'/components/DeviceDetails/startupCard',
                    name:'启动卡信息',
                    component:startupCard,
                    meta: {
                        requireAuth: true
                    }
                },
                {
                    path:'/components/DeviceDetails/virtualCard',
                    name:'虚拟卡信息',
                    component:virtualCard,
                    meta: {
                        requireAuth: true
                    }
                },
                {
                    path:'/components/DeviceDetails/ScheduleLogs',
                    name:'调度日志',
                    component:ScheduleLogs,
                    meta: {
                        requireAuth: true
                    }
                },
                {
                    path:'/components/DeviceDetails/comboRecharge',
                    name:'套餐充值',
                    component:comboRecharge,
                    meta: {
                        requireAuth: true
                    },
                    children:[
                        {
                            path:'/components/DeviceDetails/bought',
                            name:'已购买套餐',
                            component:bought,
                            meta: {
                                requireAuth: true
                            },
                        },
                        {
                            path:'/components/DeviceDetails/choose',
                            name:'可购买套餐',
                            component:choose,
                            meta: {
                                requireAuth: true
                            },
                        },
                    ]

                },
                {
                    path:'/components/DeviceDetails/location',
                    name:'设备位置',
                    component:location,
                    meta: {
                        requireAuth: true
                    }
                },
                {
                    path:'/components/DeviceDetails/attestation',
                    name:'实名认证',
                    component:attestation,
                    meta: {
                        requireAuth: true
                    }
                },
                {
                    path:'/components/DeviceDetails/speedLimit',
                    name:'设备限速',
                    component:speedLimit,
                    meta: {
                        requireAuth: true
                    }
                },
                {
                    path:'/components/DeviceDetails/operate',
                    name:'操作记录',
                    component:operate,
                    meta: {
                        requireAuth: true
                    }
                },
                {
                    path:'/components/DeviceDetails/consumption',
                    name:'设备日平均用量（网速）',
                    component:consumption,
                    meta: {
                        requireAuth: true
                    }
                },
            ],
            meta: {
                requireAuth: true
            }
        },{
            path: '/device/Combo',
            name: '设备套餐',
            component: Combo,
            meta: {
                requireAuth: true
            }
        },{
            path: '/device/DeviceType',
            name: '设备类型管理',
            component: DeviceType,
            meta: {
                requireAuth: true
            }
        },{
            path: '/device/Warehousing',
            name: '设备入库',
            component: Warehousing,
            meta: {
                requireAuth: true
            }
        },{
            path: '/device/Distribute',
            name: '设备分发',
            component: Distribute,
            meta: {
                requireAuth: true
            }
        },{
            path: '/device/Recharge',
            name: '设备充值',
            component: Recharge,
            meta: {
                requireAuth: true
            }
        },{
            path: '/device/Flow',
            name: '设备流量',
            component: Flow,
            meta: {
                requireAuth: true
            }
        },{
            path: '/device/Bill',
            name: '流量详单',
            component: Bill,
            meta: {
                requireAuth: true
            }
        },
        //支付管理
        {
            path: '/pay/orders',
            name: '订单管理',
            component: orders,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/refund',
            name: '退费单管理',
            component: refund,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/WXrefund',
            name: '微信退费管理',
            component: WXrefund,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/Coupons',
            name: '优惠券管理',
            component: Coupons,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/CouponRecords',
            name: '系统环境变量',
            component: CouponRecords,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/RechargeCard',
            name: '充值卡管理',
            component: RechargeCard,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/BalanceRecharge',
            name: '余额充值订单',
            component: BalanceRecharge,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/BalanceRefund',
            name: '余额充值退费',
            component: BalanceRefund,
            meta: {
                requireAuth: true
            }
        }, 
        //售后管理
        {
            path: '/afterSales/deviceAfterSales',
            name: '设备售后',
            component: deviceAfterSales,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/afterSales/TariffTransfer',
            name: '资费转移',
            component: TariffTransfer,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/afterSales/complaints',
            name: '售后投诉',
            component: complaints,
            meta: {
                requireAuth: true
            }
        },
        //成本管理
        {
            path: '/CostMana/tactics',
            name: '限速策略',
            component: tactics,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/CostManag/Recording',
            name: '限速记录',
            component: Recording,
            meta: {
                requireAuth: true
            }
        },
        //商户管理 
        {
            path: '/Businesses/Businesses',
            name: '商户管理',
            component: Businesses,
            meta: {
                requireAuth: true
            }
        },
        //调度管理 
        {
            path: '/dispatch/CardSet',
            name: '卡组管理',
            component: CardSet,
            meta: {
                requireAuth: true
            }
        },{
            path: '/dispatch/DeviceGroups',
            name: '设备组管理',
            component: DeviceGroups,
            meta: {
                requireAuth: true
            }
        },{
            path: '/dispatch/strategy',
            name: '策略配置',
            component: strategy,
            meta: {
                requireAuth: true
            }
        },{
            path: '/dispatch/log',
            name: '调度日志',
            component: log,
            meta: {
                requireAuth: true
            }
        },{
            path: '/dispatch/state',
            name: '调度状态',
            component: state,
            meta: {
                requireAuth: true
            }
        },
        //SIM卡管理
        {
            path: '/SimCard/manage',
            name: 'SIM卡管理',
            component: manage,
            meta: {
                requireAuth: true
            }
        },{
            path: '/SimCard/stockroom',
            name: 'SIM卡入库',
            component: stockroom,
            meta: {
                requireAuth: true
            }
        },{
            path: '/SimCard/StateManag',
            name: 'SIM卡状态管理',
            component: StateManag,
            meta: {
                requireAuth: true
            }
        },{
            path: '/SimCard/enquiries',
            name: 'SIM卡查询',
            component: enquiries,
            meta: {
                requireAuth: true
            }
        },
        //套餐管理
        {
            path: '/comboManage/Operators',
            name: '运营商套餐管理',
            component: Operators,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/comboManage/user',
            name: '用户套餐管理',
            component: user,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/comboManage/grouping',
            name: '套餐分组',
            component: grouping,
            meta: {
                requireAuth: true
            }
        },
        //系统管理
        {
            path: '/system/Account',
            name: '账号管理',
            component: Account,
            meta: {
                requireAuth: true
            }
        },
        //公众号管理
        {
            path: '/OfficialAccount/manage',
            name: '公众号管理',
            component: Manage,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/OfficialAccount/UserLabel',
            name: '用户标签',
            component: UserLabel,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/OfficialAccount/activity',
            name: '微信活动',
            component: activity,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/OfficialAccount/AppImage',
            name: 'app图片',
            component: AppImage,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/OfficialAccount/AppMessage',
            name: 'app消息',
            component: AppMessage,
            meta: {
                requireAuth: true
            }
        },
        


        {
            path: '/device/Config',
            name: '支付配置',
            component: Config,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/druid/login',
            name: '监控查询',
            component: druidLogin,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/CostManag/statistics',
            name: '数据可视化',
            component: statistics,
            meta: {
                requireAuth: true
            }
        }]
    }]
})